{% extends 'my_center_base.html' %}
		<title>{% block title %}-个人信息{% endblock %}</title>

{% block js_css %}
		<link rel="stylesheet" type="text/css" href="/static/css/mygrxx.css" />
{% endblock %}
		<!------------------------------head------------------------------>
{% block idea %}
		<!------------------------------idea------------------------------>
		<div class="address mt">
			<div class="wrapper clearfix">
				<a href="/index" class="fl">首页</a>
				<span>/</span>
				<a href="/my_mygrxx" class="on">个人信息</a>
			</div>
		</div>
{% endblock %}
		<!------------------------------Bott------------------------------>
{% block li %}
	<div>
						<h4>我的交易</h4>
						<ul>
							<li><a href="{{ url('shoppingcart:carts')}}">我的购物车</a></li>
							<li><a href="{{ url('users:myorderq',kwargs={"page_num":1}) }}">我的订单</a></li>

						</ul>
						<h4>个人中心</h4>
						<ul>
							<li><a href="/my_center">我的中心</a></li>
							<li><a href="/address">地址管理</a></li>
						</ul>
						<h4>账户管理</h4>
						<ul>
							<li  class="on"><a href="/mygrxx">个人信息</a></li>
							<li><a href="/password">修改密码</a></li>
						</ul>
					</div>
{% endblock %}
{% block bott %}
    <div class="you fl">
					<h2>个人信息</h2>
					<div class="gxin">
                        {% if user_image %}
                        <div class="tx"><a href="#"><img src="{{ user_image }}" style="height: 100px;border-radius:60%; height: 100px; overflow:hidden;"/><p id="avatar">修改头像</p></a></div>
                        {% else %}
                         <div class="tx"><a href="#"><img src="/static/img/tx.png"/><p id="avatar">修改头像</p></a></div>
						{% endif %}
						<div class="xx">
							<h3 class="clearfix"><strong class="fl">基础资料</strong><a href="#" class="fr" id="edit1">编辑</a></h3>
							{% if birth_date and gender %}
							<div>姓名：{{ username }}</div>
                            <br>
							<div>生日：{{ birth_date }}</div>
							<br>
                            <div>性别：{{ gender }}</div>
							<br>
							{% else %}
                            <div>姓名：{{ username }}</div>
                            <br>
							<div>生日：请进行编辑</div>
							<br>
                            <div>性别：请进行编辑</div>
							<br>
                            {% endif %}
{#                            <h3>高级设置</h3>#}
{#							<div><span class="fl">银行卡</span><a href="#" class="fr">管理</a></div>#}
{#							<div><span class="fl">账号地区：中国</span><a href="#" class="fr" id="edit2">修改</a></div>#}
						</div>
					</div>
				</div>
    <!--遮罩-->
    <div class="mask"></div>
    <!--编辑弹框-->
    <div class="bj">
        <div class="clearfix"><a href="{{ url('users:my_mygrxx') }}" class="fr gb"><img src="/static/img/icon4.png"/></a></div>
        <h3>编辑基础资料</h3>
        <form href="{{ url('users:my_center') }}" method="post">
            <p><label>姓名：</label><input type="text" name="username" placeholder="输入修改的名字" /></p>
            <p><label>生日：</label><input type='date' name="date"/></p>
            <p>
                <label>性别：</label>
                <span><input type="radio" name="gender" value="男" />男</span>
                <span><input type="radio" name="gender" value="女" />女</span>
            </p>
            <div class="bc">
                <input type="submit" value="保存"  />
                <input type="button" value="取消" />
            </div>
        </form>
    </div>

    <!--修改头像-->
    <div class="avatar">
        {% if user_image %}
        <div class="tx"><a href="#" ><img src="{{ user_image }}" style="height: 100px;border-radius:60%; width: 100px; overflow:hidden;"/></a></div>
        {% else %}
         <div class="tx"><a href="#" ><img src="/static/img/tx.png" style="width: 100px"/><p id="avatar">修改头像</p></a></div>
        {% endif %}

        <h3>修改头像</h3>
        <form method="post" href="{{ url('users:my_center') }}" enctype="multipart/form-data">
            <label>请上传图片</label>
            <input type="file" name="avatar" id="image" value="上传头像" />

            <p>jpg或png，大小不超过2M</p>
            <input type="submit" value="提交" />
        </form>
    </div>
{% endblock %}

{% block script %}
    {% if messages %}
    <script>
        {% for msg in messages %}
            alert('{{ msg.message }}');
        {% endfor %}
    </script>
{% endif %}
{% endblock %}
